An E cient Algorithm for Concurrent Priority

نویسندگان

  • Galen C. Hunt
  • Michael L. Scott
چکیده

We present a new algorithm for concurrent access to array-based priority queue heaps. Deletions proceed top-down as they do in a previous algorithm due to Rao and Kumar 6], but insertions proceed bottom-up, and consecutive insertions use a bit-reversal technique to scatter accesses across the fringe of the tree, to reduce contention. Because insertions do not have to traverse the entire height of the tree (as they do in previous work), as many as O(M) operations can proceed in parallel, rather than O(logM) on a heap of size M. Experimental results on a Silicon Graphics Challenge multiprocessor demonstrate good overall performance for the new algorithm on small heaps, and signiicant performance improvements over known alternatives on large heaps with mixed insertion/deletion workloads. 1 void insert(int priority, int data, heap_t *heap) { LOCK(heap->lock); i = ++heap->size; ip = &heap->itemi]; ip->pri = priority; ip->dat = data; while(i>1) { parent = i>>1; pp = &heap->itemmparent]; if(ip->pri < pp->pri) SWAP(ip,pp); /* swap items i and parent */ else break; i = parent; ip = pp; } UNLOCK(heap->lock); } int delete(int *priority, int *data, heap_t *heap) { LOCK(heap->lock); if(heap->size < 1){ UNLOCK(heap->lock); return 0; } i=1; ip = &heap->itemm1]; *priority = ip->pri; *data = ip->dat; lp = &heap->itemmheap->size-]; ip->pri = lp->pri; ip->dat = lp->dat; while(i <= heap->size>>1){ min = MIN_CHILD(i); /* index of child with higher priority */ mp = &heap->itemmmin]; if(ip->pri > mp->pri) SWAP(ip,mp); /* swap items i and min */ else break; i = min; ip = mp; } UNLOCK(heap->lock); return 1; } Figure 1: Single-lock heap operations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An E cient Implementation of Parallel A *

This paper presents a new parallel implementation of the heuristic state space search A* algorithm. We show the eeciency of a new utilization of data structure the treap, instead of traditional priority queues (heaps). This data structure allows operations such as Insert, DeleteMin and Search which are essential in the A* algorithm. Furthermore , we give concurrent algorithm of the treap within...

متن کامل

An E cient Algorithm for Concurrent Priority Queue Heaps

We present a new algorithm for concurrent access to array-based priority queue heaps. Deletions proceed top-down as they do in a previous algorithm due to Rao and Kumar [7], but insertions proceed bottom-up, and consecutive insertions use a bit-reversal technique to scatter accesses across the fringe of the tree, to reduce contention. Because insertions do not have to traverse the entire height...

متن کامل

Multiprocessor Scheduling For Real Time Systems Embedded Systems

energy-ef?cient tasks scheduling algorithm for real-time utility accrual real-time scheduling for multiprocessor multiprocessor real-time scheduling in industrial embedded a novel approach for off-line multiprocessor scheduling in multiprocessor scheduling for real time systems embedded robust partitioned scheduling for realtime multiprocessor multiprocessor scheduling for real time systems emb...

متن کامل

A Heap-Based Concurrent Priority Queue with Mutable Priorities for Faster Parallel Algorithms

Existing concurrent priority queues do not allow to update the priority of an element after its insertion. As a result, algorithms that need this functionality, such as Dijkstra’s single source shortest path algorithm, resort to cumbersome and inefficient workarounds. We report on a heap-based concurrent priority queue which allows to change the priority of an element after its insertion. We sh...

متن کامل

Timing Analysis of Concurrent Systems 1 An Algorithm for Determining Time Separation of Events

A fundamental problem in the synthesis and optimization of concurrent systems is the determination of the separation time between system events. We present a theoretical framework for solving this problem for arbitrary process graphs without conditional behavior and develop an e cient and exact algorithm based on this theoretical foundation. Examples are used to demonstrate the operation and ge...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996